package com.yuanfeng.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanfeng.business.dto.ManageShopExpressAddParamDTO;
import com.yuanfeng.business.entity.ShopExpressEntity;
import com.yuanfeng.business.vo.ManageShopExpressQueryVO;
import com.yuanfeng.commoms.dto.base.BaseExpressDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName ShopExpressMapper
 * @Description 店铺物流
 * @Author cf
 * @Date 2023/7/5 9:46
 * @Version 1.0
 */
@Mapper
public interface ShopExpressMapper extends BaseMapper<ShopExpressEntity> {

    /**
     * 查询店铺的快递公司
     * @param shopId
     * @return
     */
    List<ManageShopExpressQueryVO> selectByShopId(@Param("shopId")Integer shopId);

    /**
     * 插入店铺物流
     * @param shopExpressList
     */
    void insertBatch(@Param("shopExpressList")List<ManageShopExpressAddParamDTO> shopExpressList);

    /**
     * 修改店铺物流
     * @param shopExpressList
     */
    void updateBatch(@Param("shopExpressList")List<ManageShopExpressAddParamDTO> shopExpressList);

    /**
     * 删除店铺物流
     * @param userExpressIds
     * @param shopId
     */
    void deleteBatch(@Param("userExpressIds")List<Integer> userExpressIds,@Param("shopId")Integer shopId);


    /**
     * 查找店铺的快递公司
     *
     * @param shopId
     * @return
     */
    List<BaseExpressDTO> selectShopExpress(Integer shopId);

}
